IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[spVehicleJob_UpdateVehicleJob]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
	DROP PROCEDURE [dbo].[spVehicleJob_UpdateVehicleJob]
GO

GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		Eric Liew
-- Create date: 6/2/2009
-- Description:	Get all vehicle
-- =============================================
CREATE PROCEDURE [dbo].[spVehicleJob_UpdateVehicleJob]
(
		@JobId		INT,
		@VehicleId	INT,
		@JobDate	DateTime,
		@Mechanic	Varchar(50),
		@Kms		Varchar(20),
		@StartTime	DateTime,
		@EndTime	DateTime,
		@Damages	Varchar(500),
		@WorkDone    Varchar(500)

)AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;
	UPDATE VehicleJob
	SET VehicleId = @VehicleId,
		JobDate = @JobDate,
		Mechanic = @Mechanic,
		Kms = @Kms,
		StartTime = @StartTime,
		EndTime = @EndTime,
		Damages = @Damages,
		WorkDone = @WorkDone
	WHERE
	JobId = @JobId 
 

END
GO
